<?php

use yii\helpers\Html;
use common\models\User;
use kartik\builder\Form;
use kartik\form\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\models\search\UserSearch */
/* @var $form yii\bootstrap\ActiveForm */
?>

<div class="user-search">
    <?php

    $form = ActiveForm::begin([
        'type' => ActiveForm::TYPE_VERTICAL,
        'formConfig' => ['labelSpan' => 2, 'deviceSize' => ActiveForm::SIZE_SMALL],
        'action' => ['index'],
        'method' => 'get',
    ]);

    echo Form::widget([
        'model' => $model,
        'form' => $form,
        'columns' => 4,
        'compactGrid' => true,
        'attributes' => [
            'username' => ['type' => Form::INPUT_TEXT],
            'email' => ['type' => Form::INPUT_TEXT],
            'mobile' => ['type' => Form::INPUT_TEXT],
            'status' => [
                'type' => Form::INPUT_RADIO_LIST,
                'items' => User::statuses(),
                'options' => ['inline' => true]
            ],
        ]
    ]);
    ?>
    <div class="panel-footer text-right">
        <?php echo Html::submitButton(Yii::t('backend', 'Search'), ['class' => 'btn btn-primary']) ?>
        <?php echo Html::resetButton(Yii::t('backend', 'Reset'), ['class' => 'btn btn-default']) ?>
    </div>
    <?php ActiveForm::end(); ?>
</div>